/**
 * Created by mill on 2018/3/25.
 */

(function (w) {

    function getLine(a, b, space,cb) {
        var arr = [];
        for(var i =a,index=0;i<b;i+=space,index++)
            arr[index]=cb?cb(i):i;
        return arr;
    }

    function sin(arr) {
        return arr.map(item=>Math.sin(item));
    }

    w.MArray={
        getLine:getLine,
        sin:sin
    }
    // console.log(getLine(-10,10,0.1))
})(window);